<html>
<head>
    <css file="__PUBLIC__/css/body.css"/>
    <css file="__STATIC__/icon/icon.css"/>
    <js file="__STATIC__/jquery-1.7.2.min.js"/>
    <js file="__PUBLIC__/js/Category.js"/>
    <style type="text/css">
        .exp{float:left;font-size:16px;height:30px;line-height:30px;width:13px;font-weight: bold;}
        .title-ex{float: left;height:30px;line-height:30px;}
    </style>
</head>
<body>
<form action="{:U('Category/orders')}" method="post">
    <div class="top">
        <div class="position"><span class="icon icon-31"></span>当前位置：分类列表</div>
        <div class="top-title">
            <span class="icon icon-32"></span>
            <div class="top-tool">
                <a href="{:U('Category/add')}" class="button-a">添加分类</a>
                <input type="submit" class="button-b" value="保存排序"/>
            </div>
        </div>
    </div>
    <div class="body">
        <table class="list-tb" border="0" cellpadding="0" cellspacing="4">
             <tr> 
                <th width="5%">排序</th>  
                <th width="5%">ID</th>  
                <th width="35%">名称</th>  
                <th width="15%">模块标识</th>  
                <th width="10%">状态</th> 
                <th width="10%">是否显示</th> 
                <th width="15%">操作</th>
            </tr>
            <foreach name="category" item="v">
                <tr id="{$v['id']}" pid="{$v['pid']}">  
                    <td><input style="width:30px;text-align:center;" name='{$v["id"]}' value="{$v['orders']}"/></td>  
                    <td>{$v['id']}</td>  
                    <td class="title">
                        <a fold="0" class="exp" href="javascript:void(0);" onclick="fold({$v['id']},this)">+</a>
                        <a class="title-ex" href="{:U('Category/modify',array('id'=>$v['id']))}">{$v['title']}</a>
                    </td>  
                    <td>{$v['module']}</td> 
                    <td>
                        <if condition="!$v['lock']">启用<else/>禁用</if> 
                    </td> 
                    <td>
                        <if condition="!$v['show']">显示<else/>隐藏</if>
                    </td> 
                    <td class="operate">
                        <a href="{:U('Category/modify',array('id'=>$v['id']))}"><span class="icon icon-43"></span>修改</a>
                        <a href="{:U('Category/delete',array('id'=>$v['id']))}"><span class="icon icon-44"></span>删除</a>
                    </td> 
                </tr> 
                <foreach name="v.child" item="v1">
                    <tr id="{$v1['id']}" pid="{$v1['pid']}" fold="0" style="display: none;">  
                        <td><input  style="width:30px;text-align:center;" name="{$v1['id']}" value="{$v1['orders']}"/></td>  
                        <td>{$v1['id']}</td>  
                        <td class="title" style="padding-left:10px;">
                                <a fold="0" class="exp" href="javascript:void(0);" onclick="fold({$v1['id']},this)">+</a>
                                <a class="title-ex" href="{:U('Category/modify',array('id'=>$v1['id']))}">{$v1['title']}</a>
                        </td>  
                        <td>{$v1['module']}</td> 
                        <td>
                            <if condition="!$v1['lock']">启用<else/>禁用</if>
                        </td> 
                        <td>
                            <if condition="!$v1['show']">显示<else/>隐藏</if>
                        </td> 
                        <td class="operate">
                            <a href="{:U('Category/modify',array('id'=>$v1['id']))}"><span class="icon icon-43"></span>修改</a>
                            <a href="{:U('Category/delete',array('id'=>$v1['id']))}"><span class="icon icon-44"></span>删除</a>
                        </td> 
                    </tr> 
                    <foreach name="v1.child" item="v2">
                        <tr id="{$v2['id']}" pid="{$v2['pid']}" fold="0" style="display: none;">  
                            <td><input style="width:30px;text-align:center;" name="{$v2['id']}" value="{$v2['orders']}"/></td>  
                            <td>{$v2['id']}</td>  
                            <td class="title" style="padding-left:20px;">
                                    <a fold="0" class="exp" href="javascript:void(0);" onclick="fold({$v2['id']},this)">+</a>
                                    <a class="title-ex" href="{:U('Category/modify',array('id'=>$v2['id']))}">{$v2['title']}</a>
                            </td>  
                            <td>{$v2['module']}</td> 
                            <td>
                                <if condition="!$v2['lock']">启用<else/>禁用</if>
                            </td> 
                            <td>
                                <if condition="!$v2['show']">显示<else/>隐藏</if>
                            </td> 
                            <td class="operate">
                                <a href="{:U('Category/modify',array('id'=>$v2['id']))}"><span class="icon icon-43"></span>修改</a>
                                <a href="{:U('Category/delete',array('id'=>$v2['id']))}"><span class="icon icon-44"></span>删除</a>
                            </td> 
                        </tr>
                        <foreach name="v2.child" item="v3">
                            <tr id="{$v3['id']}" pid="{$v3['pid']}" fold="0" style="display: none;">  
                                <td><input  style="width:30px;text-align:center;" name="{$v3['id']}" value="{$v3['orders']}"/></td>  
                                <td>{$v3['id']}</td>  
                                <td class="title" style="padding-left:30px;">
                                    <a fold="0" class="exp" href="javascript:void(0);" onclick="fold({$v3['id']},this)">+</a>
                                    <a class="title-ex" href="{:U('Category/modify',array('id'=>$v3['id']))}">{$v3['title']}</a>
                                </td>  
                                <td>{$v3['module']}</td> 
                                <td>
                                    <if condition="!$v3['lock']">启用<else/>禁用</if>
                                </td> 
                                <td>
                                    <if condition="!$v3['show']">显示<else/>隐藏</if>
                                </td> 
                                <td class="operate">
                                    <a href="{:U('Category/modify',array('id'=>$v3['id']))}"><span class="icon icon-43"></span>修改</a>
                                    <a href="{:U('Category/delete',array('id'=>$v3['id']))}"><span class="icon icon-44"></span>删除</a>
                                </td> 
                            </tr> 
                            <foreach name="v3.child" item="v4">
                                <tr id="{$v4['id']}" pid="{$v4['pid']}" fold="0" style="display: none;">  
                                    <td><input  style="width:30px;text-align:center;" name="{$v4['id']}" value="{$v4['orders']}"/></td>  
                                    <td>{$v4['id']}</td>  
                                    <td class="title" style="padding-left:40px;">
                                        <a fold="0" class="exp"  href="javascript:void(0);" onclick="fold({$v4['id']},this)">+</a>
                                        <a class="title-ex" href="{:U('Category/modify',array('id'=>$v4['id']))}">{$v4['title']}</a>
                                    </td>  
                                    <td>{$v4['module']}</td> 
                                    <td>
                                        <if condition="!$v4['lock']">启用<else/>禁用</if>
                                    </td> 
                                    <td>
                                        <if condition="!$v4['show']">显示<else/>隐藏</if>
                                    </td> 
                                    <td class="operate">
                                        <a href="{:U('Category/modify',array('id'=>$v4['id']))}"><span class="icon icon-43"></span>修改</a>
                                        <a href="{:U('Category/delete',array('id'=>$v4['id']))}"><span class="icon icon-44"></span>删除</a>
                                    </td> 
                                </tr> 
                            </foreach>
                        </foreach>
                    </foreach>
                </foreach>
            </foreach>
        </table>
    </div>
</form>
</body>
</html>